package com.hqully.smartfumehood.entity;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.Objects;

import lombok.Data;

/**
 * <p>
 *     烟雾报警器数据实体类
 * </p>
 * @author liulingyu
 * @date 2022-06-24 10:37
 * @version 1.0
 */
@Data
public class SmokeData implements Serializable {
    /**
     *
     */
    private Long id;

    private Long APId;

    private Long airId;
    /**
     *
     */
    private Long smokeId;

    /**
     * 
     */
    private Integer smokeConc;

    /**
     * 
     */
    private Integer smokeAlarm;

    /**
     * 
     */
    private LocalDateTime time;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SmokeData smokeData = (SmokeData) o;
        return Objects.equals(id, smokeData.id) && Objects.equals(APId, smokeData.APId) && Objects.equals(airId, smokeData.airId) && Objects.equals(smokeId, smokeData.smokeId) && Objects.equals(smokeConc, smokeData.smokeConc) && Objects.equals(smokeAlarm, smokeData.smokeAlarm) && Objects.equals(time, smokeData.time);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, APId, airId, smokeId, smokeConc, smokeAlarm, time);
    }

    private static final long serialVersionUID = 1L;

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", APId=").append(APId);
        sb.append(", smokeId=").append(smokeId);
        sb.append(", smokeConc=").append(smokeConc);
        sb.append(", smokeAlarm=").append(smokeAlarm);
        sb.append(", time=").append(time);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}